package com.liu.text.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * @Author QS.Liu
 * @date 2020/5/17/15:54
 *
 */
@Service
public class AsyncService {
    //异步任务
    @Async
    public void hello(){
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("数据正在处理........");
    }
}
